package com.carkeeper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carkeeper.pojo.CompTypePO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CompTypeMapper extends BaseMapper<CompTypePO> {

    @Select("SELECT ct.NAME FROM tb_component_type ct INNER JOIN tb_class_properties cp ON cp.class_id = ct.id WHERE cp.class_id = #{id};")
    List<String> queryByClassPropertiesId(@Param("id") Long classId);

}
